<template>
  <view class="userInfo-container">
    <view class="userInfo-content">
      <view class="main-enter">
        <image mode="aspectFit" :src="enterFromIcon" class="enterFrom-img" />
        <text class="button-text">登陆已失效</text>
        <text class="button-text">请从零信任中重新进入</text>
      </view>
    </view>
  </view>
</template>

<script>
  import enterFromIcon from '@/static/enterFromLingxinren/enterFrom-icon.png';
  import { useUserStore } from '@/store/user';
  export default {
    data() {
      return {
        enterFromIcon,
      };
    },
    onShow() {
      const userStore = useUserStore();
      if (userStore.token) {
        uni.switchTab({
          url: '/pages/chatList/index'
        });
      }
    },
    methods: {
      goLogin() {
        uni.navigateTo({
          url: '/pages/login/index'
        });
      },
      goUserInfo() {
        const userStore = useUserStore();
        userStore.getUserInfo();
      }
    }
  };
</script>

<style lang="scss" scoped>
  .userInfo-container {
    padding-top: var(--status-bar-height);
    .userInfo-content {
      height: calc(100vh - var(--status-bar-height));
      overflow: auto;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;

      .main-enter {
        display: flex;
        align-items: center;
        flex-direction: column;
        margin-top: -20rpx;
        .enterFrom-img {
          width: 104rpx * 2;
          height: 104rpx * 2;
          margin-bottom: 28rpx * 2;
        }

        .button-text {
          color: #666666;
          font-size: 15rpx * 2;
          line-height: 1.1;
          margin-bottom: 10rpx * 2;
        }
      }
    }

    .debug-box {
      width: 100%;
    }
    .debug-info {
      text-align: left;
      padding: 0 20rpx;
      margin-top: 20rpx;
    }
    .login-btn {
      margin-top: 20rpx;
    }
  }
</style>
